package lanQiaoBei.数据结构.散列表_哈希表;

import java.io.*;

/*
 * 字符串哈希
 * 给定一段字符串str长度为n和 m个询问：l1,r1 l2,r2区间的字符串是否相等如果相等
 * 输出Yes否则输出NO
 * */

public class P3{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    final static int N=100010,P=131;
    static long h[]=new long[N],p[]=new long[N];
    static int n,m;
    static char[]str=new char[N];


    static long find(int l,int r){
        return h[r]-h[l-1]*p[r-l+1];
    }
    public static void main(String[]args)throws Exception{
        String[]ss=br.readLine().split(" ");
        n=Integer.parseInt(ss[0]);m=Integer.parseInt(ss[1]);
        br.read(str,1,n);
        br.readLine();
        //计算字符串所有前缀的hash值
        p[0]=1L;
        for(int i=1;i<=n;i++){
            p[i]=p[i-1]*P;
            h[i]=h[i-1]*P+str[i];
        }
        while(m-->0){
            ss=br.readLine().split(" ");
            int l1=Integer.parseInt(ss[0]),r1=Integer.parseInt(ss[1]),
                    l2=Integer.parseInt(ss[2]),r2=Integer.parseInt(ss[3]);
            long h1=find(l1,r1);
            long h2=find(l2,r2);
            if(h1==h2)System.out.println("Yes");
            else System.out.println("No");
        }
    }
}